#ifndef __DIRVER_LED_H
#define __DIRVER_LED_H
#include "py32f0xx_hal.h"
#include <stdint.h>
#include <stdbool.h>
typedef enum
{
	INDICATOR_ON,
	INDICATOR_OFF,
	INDICATOR_BLINK,
	INDICATOR_DELAY_ON,
} IndicatorState;

typedef struct Indicator
{
	GPIO_TypeDef *GPIOx;
	uint8_t pin;
	uint16_t blinkIntervalOn;	 // ms
	uint16_t blinkIntervalOff; // ms
	uint32_t lastChangeTime;
	uint8_t state;
	uint8_t isLedOn;
} Indicator;

void indicatorInit(Indicator *indicators, uint8_t size);
void indicatorWorking(Indicator *indicators, uint8_t size);

#endif
